{
	template:`
	<div class="padding-top padding-lr">
	    <a-alert type="success" show-icon>
	        <template #message>
	            <a-row>
	                <a-col :span="12">
	                    <div class="text-lg">你好！{{user.realname}}  <small>{{store.name}}</small></div>
	                </a-col>
	                <a-col :span="12">
	                    <div class="text-right">{{date}}</div>
	                </a-col>
	            </a-row>
	        </template>
	    </a-alert>
    </div>
	<a-row :gutter="16" style="padding:0 15px 15px;">
        <a-col :span="18">
	        <a-divider orientation="left">当月完成情况：</a-divider>
            <a-row :gutter="16">
                <a-col :span="6">
                    <a-card @click="openMenuPage('C1101',{params:{'type':'A','status':'Y'}})" :hoverable="true" bodyStyle="padding:15px;" class="bg-blue">
                        <div>
                            <m-icon name="icon-icon-92" size="32" style="vertical-align: top;margin-right: 15px;margin-bottom: -15px;margin-top: -5px;"></m-icon>
                            已完成 <span class="text-xl">{{formatNumber(dataMap.userMonthStockNum||0,'#,##0')}}</span>个入库订单
                        </div>
                        <div class="text-right text-xxl">
                            {{formatNumber(dataMap.userMonthStockAmount||0,'#,##0.00')}}
                            <span class="text-right text-df">元</span>
                        </div>
                    </a-card>
                </a-col>
                <a-col :span="6">
                    <a-card @click="openMenuPage('C2102',{params:{'status':'Y'}})" :hoverable="true" bodyStyle="padding:15px;" class="bg-orange">
                        <div>
                            <m-icon name="icon-icon-21" size="32" style="vertical-align: top;margin-right: 15px;margin-bottom: -15px;margin-top: -5px;"></m-icon>
                            已成功付款 <span class="text-xl">{{formatNumber(dataMap.userMonthPayNum||0,'#,##0')}}</span>次
                        </div>
                        <div class="text-right text-xxl">
                            {{formatNumber(dataMap.userMonthPayAmount||0,'#,##0.00')}}
                            <span class="text-right text-df">元</span>
                        </div>
                    </a-card>
                </a-col>
                <a-col :span="6">
                    <a-card @click="openMenuPage('C1103',{params:{'type':'A','status':'Y'}})" :hoverable="true" bodyStyle="padding:15px;" class="bg-green">
                        <div>
                            <m-icon name="icon-templatedefault" size="32" style="vertical-align: top;margin-right: 15px;margin-bottom: -15px;margin-top: -5px;"></m-icon>
                            已完成 <span class="text-xl">{{formatNumber(dataMap.userMonthSaleNum||0,'#,##0')}}</span>个出库订单
                        </div>
                        <div class="text-right text-xxl">
                            {{formatNumber(dataMap.userMonthSaleAmount||0,'#,##0.00')}}
                            <span class="text-right text-df">元</span>
                        </div>
                    </a-card>
                </a-col>
                <a-col :span="6">
                    <a-card @click="openMenuPage('C2104',{params:{'status':'Y'}})" :hoverable="true" bodyStyle="padding:15px;" class="bg-red">
                        <div>
                            <m-icon name="icon-icon-167" size="32" style="vertical-align: top;margin-right: 15px;margin-bottom: -15px;margin-top: -5px;"></m-icon>
                            已成功收款 <span class="text-xl">{{formatNumber(dataMap.userMonthIncomeNum||0,'#,##0')}}</span>次
                        </div>
                        <div class="text-right text-xxl">
                            {{formatNumber(dataMap.userMonthIncomeAmount||0,'#,##0.00')}}
                            <span class="text-right text-df">元</span>
                        </div>
                    </a-card>
                </a-col>
            </a-row>
            <a-row :gutter="16" class="margin-top">
                <a-col :span="4">
                    <a-card @click="openMenuPage('C1105')" :hoverable="true" bodyStyle="padding:10px 10px 10px 15px;" class="text-green">
                        <a-flex gap="middle" align="center">
                            <m-icon name="icon-icon-167" size="22"></m-icon>
                            <b class="text-lg">登记生产</b>
                        </a-flex>
                    </a-card>
                </a-col>
                <a-col :span="4">
                    <a-card @click="openMenuPage('C1107')" :hoverable="true" bodyStyle="padding:10px 10px 10px 15px;" class="text-mauve">
                        <a-flex gap="middle" align="center">
                            <m-icon name="icon-icon-167" size="22"></m-icon>
                            <b class="text-lg">登记盘点</b>
                        </a-flex>
                    </a-card>
                </a-col>
                <a-col :span="4">
                    <a-card @click="openMenuPage('C0903')" :hoverable="true" bodyStyle="padding:10px 10px 10px 15px;" class="text-olive">
                        <a-flex gap="middle" align="center">
                            <m-icon name="icon-icon-167" size="22"></m-icon>
                            <b class="text-lg">询价记录</b>
                        </a-flex>
                    </a-card>
                </a-col>
                <a-col :span="4">
                    <a-card @click="openMenuPage('C3113')" :hoverable="true" bodyStyle="padding:10px 10px 10px 15px;" class="text-cyan">
                        <a-flex gap="middle" align="center">
                            <m-icon name="icon-icon-167" size="22"></m-icon>
                            <b class="text-lg">客户查询</b>
                        </a-flex>
                    </a-card>
                </a-col>
                <a-col :span="4">
                    <a-card @click="openMenuPage('C3114')" :hoverable="true" bodyStyle="padding:10px 10px 10px 15px;" class="text-purple">
                        <a-flex gap="middle" align="center">
                            <m-icon name="icon-icon-167" size="22"></m-icon>
                            <b class="text-lg">商品查询</b>
                        </a-flex>
                    </a-card>
                </a-col>
                <a-col :span="4">
                    <a-card @click="openMenuPage('C3112')" :hoverable="true" bodyStyle="padding:10px 10px 10px 15px;" class="text-pink">
                        <a-flex gap="middle" align="center">
                            <m-icon name="icon-icon-167" size="22"></m-icon>
                            <b class="text-lg">员工查询</b>
                        </a-flex>
                    </a-card>
                </a-col>
            </a-row>
            <a-card :hoverable="true" bodyStyle="padding:0px;" class="margin-top">
                <div id="index_myCollect"></div>
            </a-card>
        </a-col>
        <a-col :span="6">
	        <a-divider orientation="left">待办</a-divider>
            <a-card :hoverable="true" bodyStyle="padding:0px;">
                <a-list item-layout="horizontal" >
                    <a-list-item @click="openMenuPage('D1101')" v-if="dataMap.stockPower">
                        <div><a-tag :bordered="false" color="processing">{{formatNumber(dataMap.userCheckRepositoryNum,'#,##0')}}</a-tag>待审核订单商品</div>
                        <template #actions>
                            <a-badge v-if="dataMap.userCheckRepositoryNum" status="processing"><template #text>{{formatNumber(dataMap.userCheckRepositoryAmount,'#,##0.00')}}元</template></a-badge>
                            <span v-else>暂无</span>
                        </template>
                    </a-list-item>
                    <a-list-item @click="openMenuPage('D2101')" v-if="dataMap.stockPower">
                        <div><a-tag :bordered="false" color="processing">{{formatNumber(dataMap.userCheckStockNum,'#,##0')}}</a-tag>待审核入库订单</div>
                        <template #actions>
                            <a-badge v-if="dataMap.userCheckStockNum" status="processing"><template #text>{{formatNumber(dataMap.userCheckStockAmount,'#,##0.00')}}元</template></a-badge>
                            <span v-else>暂无</span>
                        </template>
                    </a-list-item>
                    <a-list-item @click="openMenuPage('E2102')" v-if="dataMap.financePower">
                        <div><a-tag :bordered="false" color="processing">{{formatNumber(dataMap.userCheckPayNum,'#,##0')}}</a-tag>待审核入库付款</div>
                        <template #actions>
                            <a-badge v-if="dataMap.userCheckPayNum" status="processing"><template #text>{{formatNumber(dataMap.userCheckPayAmount,'#,##0.00')}}元</template></a-badge>
                            <span v-else>暂无</span>
                        </template>
                    </a-list-item>
                    <a-list-item @click="openMenuPage('D2103')" v-if="dataMap.stockPower">
                        <div><a-tag :bordered="false" color="processing">{{formatNumber(dataMap.userCheckSaleNum,'#,##0')}}</a-tag>待审核出库订单</div>
                        <template #actions>
                            <a-badge v-if="dataMap.userCheckSaleNum" status="processing"><template #text>{{formatNumber(dataMap.userCheckSaleAmount,'#,##0.00')}}元</template></a-badge>
                            <span v-else>暂无</span>
                        </template>
                    </a-list-item>
                    <a-list-item @click="openMenuPage('E2104')" v-if="dataMap.financePower">
                        <div><a-tag :bordered="false" color="processing">{{formatNumber(dataMap.userCheckIncomeNum,'#,##0')}}</a-tag>待审核出库收款</div>
                        <template #actions>
                            <a-badge v-if="dataMap.userCheckIncomeNum" status="processing"><template #text>{{formatNumber(dataMap.userCheckIncomeAmount,'#,##0.00')}}元</template></a-badge>
                            <span v-else>暂无</span>
                        </template>
                    </a-list-item>
                    <a-list-item @click="openMenuPage('D2105')" v-if="dataMap.stockPower">
                        <div><a-tag :bordered="false" color="processing">{{formatNumber(dataMap.userCheckProduceNum,'#,##0')}}</a-tag>待审核生产入库订单</div>
                        <template #actions>
                            <a-badge v-if="dataMap.userCheckProduceNum" status="processing"><template #text>{{formatNumber(dataMap.userCheckProduceAmount,'#,##0.00')}}元</template></a-badge>
                            <span v-else>暂无</span>
                        </template>
                    </a-list-item>
                    <a-list-item @click="openMenuPage('D2107')" v-if="dataMap.stockPower">
                        <div><a-tag :bordered="false" color="processing">{{formatNumber(dataMap.userCheckCountNum,'#,##0')}}</a-tag>待审核库存盘点订单</div>
                        <template #actions>
                            <a-badge v-if="dataMap.userCheckCountNum" status="processing"><template #text>{{formatNumber(dataMap.userCheckCountAmount,'#,##0.00')}}元</template></a-badge>
                            <span v-else>暂无</span>
                        </template>
                    </a-list-item>
                </a-list>
            </a-card>
	        <a-divider orientation="left">{{dataMap.monthTitle}}销售排行</a-divider>
            <a-card :hoverable="true" bodyStyle="padding:0px;">
                <a-list item-layout="horizontal" >
                    <a-list-item v-for="(item,idx) in dataMap.monthList">
                        <div>
                            <span :class="[idx==0?'text-xl':(idx==1?'text-lg':''),idx<3?'text-red':'']">{{idx+1}}.</span>
                            {{item.name}}
                        </div>
                        <template #actions>
                            <span>
                                <span :class="[idx==0?'text-xl':(idx==1?'text-lg':''),idx<3?'text-red':'']">{{formatNumber(item.amount,'#,##0.00')}}</span>
                                元({{formatNumber(item.num,'#,##0')}}单)
                            </span>
                        </template>
                    </a-list-item>
                </a-list>
            </a-card>
        </a-col>
	</a-row>
	`,
	props: ['localeZh','param','parentVue'],
	data:function(){
		return {
		    store:{},
		    user:{},
		    date:'',
		    dataMap:{},
		};
	},
	mounted(){
	    this.loadData();
		this.loadPage("index_myCollect",
			"action/store/index/toEcharts",
			{method:'myCollect',params:{'echarts_x':['yearMonth'],'echarts_y':['amount1','amount2','amount3','amount4'],
			    'simple':'N','height':'350px'}},
			function(pv,v3){

	        }.bind(this)
        );
	},
	methods:{
	    pageFocus:function(){
	        this.loadData();
	    },
		loadData:function(){
			this.requestData('action/store/index/getIndexMap',
				{model:this.model},
				data=>{
					if(!data.code){
					    this.store=data.store;
					    this.user=data.user;
					    this.date=data.date;
						this.dataMap=data.dataMap;
					}else{
						this.$message.error(data.msg);
					}
				}
			);
		},
		openMenuPage:function(menuOid,p){
		    mo.pages['index_page'].tabChange(menuOid,p);
		}
	}
}